package com.liuheng.spzx.common.exception;

import com.liuheng.spzx.model.vo.common.ResultCodeEnum;
import lombok.Data;

@Data
public class
CustomException extends RuntimeException{
    private Integer code;
    private String message;
    private ResultCodeEnum resultCodeEnum;
    public CustomException(ResultCodeEnum resultCodeEnum){
//        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
        this.resultCodeEnum = resultCodeEnum;
    }
    public CustomException(Integer code,String message){
        this.code = code;
        this.message = message;
    }
}
